package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type UserLevelRequest struct {
	LevelId int64 `json:"level_id" form:"level_id"`

	Grade int64 `json:"grade" form:"grade"`

	ValidTime int64 `json:"valid_time" form:"valid_time"`

	IsForever bool `json:"is_forever" form:"is_forever"`

	MerId int64 `json:"mer_id" form:"mer_id"`

	Status int64 `json:"status" form:"status"`

	Mark string `json:"mark" form:"mark"`

	Remind int64 `json:"remind" form:"remind"`

	IsDel int64 `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

	Discount int64 `json:"discount" form:"discount"`
}

func (r *UserLevelRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *UserLevelRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"level_id": "required",

		"grade": "required",

		"valid_time": "required",

		"is_forever": "required",

		"mer_id": "required",

		"status": "required",

		"mark": "required",

		"remind": "required",

		"is_del": "required",

		"add_time": "required",

		"discount": "required",
	}
}

func (r *UserLevelRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserLevelRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *UserLevelRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
